package com.yusys.pattern.mode.visitor.observerson;

import com.yusys.pattern.mode.visitor.Observer;
import com.yusys.pattern.mode.visitor.Subject;

/**
 * 八进制观察者
 */
public class OctalObserver extends Observer {

    public OctalObserver(Subject subject) {
        this.subject = subject;
        this.subject.register(this);
    }

    @Override
    public void update() {
        System.out.println( "Octal String: " +Integer.toOctalString(subject.getState()));
    }
}
